<script setup>
import { ref, provide } from 'vue';
import Editor from './packages/Editor/index.jsx';
import { registerConfig as config } from '@/utils/editorConfig.jsx';
import data from './data.json';

const componentData = ref(data);

// 把组件配置传递给子孙组件
provide('config', config);
</script>

<template>
  <Editor v-model="componentData" />
</template>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
}
body,
html,
#app {
  height: 100%;
}
</style>
